package com.rui.patterns.interpreter;

import com.sun.org.apache.xpath.internal.operations.Minus;

/**
 * @author : [锐神NO.3]
 * @version : [v1.0]
 * @className : Client
 * @createTime : [2022/2/25 15:51]
 * @description : [描述该类的功能]
 */

public class Client {
    public static void main(String[] args) {
        Context context = new Context();

        //创建多个变量对象
        Variable a = new Variable("a");
        Variable b = new Variable("b");
        Variable c = new Variable("c");
        Variable d = new Variable("d");

        context.assign(a, 1);
        context.assign(b, 2);
        context.assign(c, 3);
        context.assign(d, 4);

        //获取抽象语法树
//        AbstractExpression expression = new Minus(a, new Plus(new Minus(b,c), d));
    }
}
